package cn.wolfcode.wolf2w.api.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import cn.wolfcode.wolf2w.common.core.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

/**
 * 回答对象 ta_answer
 * 
 * @author 浪兎兎
 * @date 2025-06-07
 */
@Data
@TableName("ta_answer")
public class Answer implements Serializable {
    private static final long serialVersionUID = 1L;
    /** 主键 */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 作者名称 */
    @Excel(name = "作者名称")
    private String authorName;

    /** 作者的id */
    @Excel(name = "作者的id")
    private Long userId;

    /** 作者的id */
    @TableField(exist = false)
    private Long level;

    /** 回答正文 */
    @Excel(name = "回答正文")
    private String answerContent;

    /** 点赞数 */
    @Excel(name = "点赞数")
    private Integer likeTotal;

    /** 问题id */
    @Excel(name = "问题id")
    private Long questionId;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @TableField(exist = false)
    private Boolean isCollect;

    /** 点赞数 */
    private Integer zanCount;

    /** 父回答id */
    private Long parentId;

    /** 父回答 */
    @TableField(exist = false)
    private Answer parent;
}
